<%--
********************************************************************************
    Document   : pnCitaciones
    Created on : 17/10/2010, 09:46:31 AM
    Author     : JAPeTo
********************************************************************************
--%>
<%@ page contentType="text/html"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<html>
<body>
    <h1>Planeador de Citas y Terapias</h1>
    <f:subview id="menu">
        <jsp:include page="tbCitaciones.jsp" flush="true"/>
    </f:subview>
    <div id="citaciones" style=" float:left; padding:3px;">
        <center>
            <object width="200" height="200" style="margin-top:90px">
                <param name="movie" value="Recursos/reloj.swf">
                <embed src="Recursos/reloj.swf" width="200" height="200">
                </embed>
            </object><br/>
            <rich:calendar popup="false" showWeekDaysBar="false" showFooter="false" ajaxSingle="true"/>
        </center>
    </div>
    <!--Empiezo el planeado-->
    <div id="horaCitaciones" style="padding-top:20px">
    <h:form id="formularioPlaneador">
        <rich:messages/>
        <a4j:jsFunction name="mostrarDialogo" oncomplete="#{rich:component('panel')}.show()" reRender="editContent" />
        <rich:calendar popup="false" datePattern="dd/MMM/yyyy" showApplyButton="false" onchanged="if (event.rich.date) {mostrarDialogo();}" cellWidth="120px" ajaxSingle="true" cellHeight="100px" boundaryDatesMode="none" showWeeksBar="false"
                       dataModel="#{calendarDataModel}"  oncurrentdateselect="return false" id="organizer" valueChangeListener="#{calendarDataModel.valueChanged}"  showFooter="false">
            <a4j:outputPanel layout="block" id="cell"  onclick="#{rich:component('organizer')}.resetSelectedDate()" style="height: 100%;" styleClass="organizer-cell" onmouseover="">
                <div>
                    <h:outputText value="{day}" style="align:center"/>
                </div>
                <div>
                    <h:outputText value="{data.Cita.escapeHTML()}" />
                </div>                
            </a4j:outputPanel>
            <%--<a4j:outputPanel layout="block" id="cell" onclick="#{rich:component('organizer')}.resetSelectedDate()" style="padding:12px;" styleClass="organizer-cell">
                    <a4j:repeat value="#{CitaBean.citas}" var="cita">
                        <h:outputText value="Hora: #{cita.horaTerapia}" style="font-size:10;"/><br/>
                    </a4j:repeat>
            </a4j:outputPanel>--%>
        </rich:calendar>
    </h:form>
        
    <rich:modalPanel id="panel" resizeable="false" width="300" height="250">
         <f:facet name="header">
            <h:panelGroup>
                <h:outputText value="Citas"></h:outputText>
            </h:panelGroup>
        </f:facet>
        <f:facet name="controls">
            <h:panelGroup>
                <h:graphicImage value="images/window/close.png" id="hidelink" styleClass="hidelink"/>
                <rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
            </h:panelGroup>
        </f:facet>
        <h1 id="titulonuevo" >Editar evento
                <h:commandButton value="Guardar" style="width:100px;float:right;" action="#{pacienteBean.grabarPaciente}"/>
        </h1>
        <hr size=5 align=left>
        <h:panelGrid columns="2">
            <h:outputText value="Fisioterapeuta:"/><rich:comboBox id="fisioEntrada" suggestionValues="#{fisioterapeutaBean.listaFisios}" defaultLabel="Escoja el Fisioterapeuta" required="true"/>
            <h:outputText value="Paciente:"/><rich:comboBox id="pacienteEntrada" suggestionValues="#{pacienteBean.pacientesList}" required="true" defaultLabel="Escoja el paciente"/>
            <h:outputText value="Hora Inicio:"/><h:inputText id="citaHoraInicio" readonly="true" value="10:30:00" required="true"/>
            <h:outputText value="Inicio:"/><rich:calendar ajaxSingle="true" id="finEvento" datePattern="yyyy-MM-dd" required="true"/>
            <h:selectBooleanCheckbox/>Avisar al paciente (EMAIL)
        </h:panelGrid>
    </rich:modalPanel>
    </div>
</body>
</html>
